package com.baturu.vin.changan.dal.dao;

import com.baturu.vin.changan.dto.ChanganVinVdsDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: chenjiahao
 * @Time: 2018/8/22
 */
public interface ChanganVinDAO {

    @Select({"select distinct btr_brand btrBrand, car_system carSystem, car_type carType, transmission_desc transmissionDesc,",
            "drive_type driveType, engine_type engineType, cylinder_volume cylinderVolume, fuel_type fuelType, end_date productTime",
            "from changan_vds_vin_8",
            "where vin_pre8 = #{vinPre8}"})
    List<ChanganVinVdsDTO> queryVinByVinPre(@Param("vinPre8") String vinPre8);

    @Select({"select distinct car_system carSystem , car_type  carType ",
            "from changan_vds_vin_11_12",
            "where vin_pre8=#{vinPre8}",
            "and vin_pre11_12 = #{vinPre11And12}"
    })
    List<ChanganVinVdsDTO> queryVinByVinPre11And12(@Param("vinPre8") String vinPre8,@Param("vinPre11And12") String vinPre11And12);
}
